import tkinter
import tkinter as tk


class Tk(tkinter.Frame):
    pass


class MainPage:
    def __init__(self, master):
        self.root = master
        self.root.geometry('700x520')
        self.root.title('程序入口')
        self.page = tk.Frame(self.root)
        self.page.pack()

        self.button = tk.Button(self.page, text='1', font=('黑体', 15), width=15, height=2,
                                command=self.to_read_button)
        self.button.grid()
        self.root.mainloop()

    def to_read_button(self) -> None:
        self.page.destroy()
        ReadPage(self.root)


class ReadPage:
    def __init__(self, master):
        self.root = master
        self.root.geometry('700x520')
        self.root.title('程序入口')
        self.page = tk.Frame(self.root)
        self.page.pack()


if __name__ == '__main__':
    root = tk.Tk()
    MainPage(root)
    root.mainloop()
